package org.standalone.client;

import java.util.Properties;

import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;

import org.student.ejb.client.view.StudentServiceRemote;

/**
 * Hello world!
 * 
 */
public class App {
	public static void main(String[] args) throws NamingException {
		Properties props = new Properties();
		props.put(Context.SECURITY_PRINCIPAL, "admin");
		props.put(Context.SECURITY_CREDENTIALS, "admin");
		InitialContext ctx = new InitialContext(props);

		StudentServiceRemote student = (StudentServiceRemote) ctx
				.lookup("org.student.ejb.client.view.StudentServiceRemote");
		System.out.println("st:" + student.getStudentName(""));
		// student.getStudent("35");
	}
}
